package com.woniu.controller;

import com.woniu.entity.PageData;
import com.woniu.entity.Result;
import com.woniu.entity.dto.FundFlowDTO;
import com.woniu.entity.vo.FundFlowVO;
import com.woniu.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @author yemaf
 * @datetime 2022/12/17 17:11:16
 */
@RestController
@RequestMapping("/fundFlow")
@Api(tags = "资金流")
public class FundFlowController {
    @Autowired
    private OrderService orderService;

    @PostMapping("/{currentPage}/{pageSize}")
    @ApiOperation("查询资金流")
    public Result queryFundFlow(@PathVariable Integer currentPage,
                                @PathVariable Integer pageSize,
                                @RequestBody(required = false) FundFlowDTO fundFlowDTO){
        PageData fundFlowVOS = orderService.queryFundFlow(currentPage, pageSize, fundFlowDTO);
        return new Result(200,"查询资金流成功",fundFlowVOS);
    }
}
